/*******************************************************************************
 * Copyright (C) 2013 Jeremy Brodt and Kevin Gillespie
 * Description: Position Controller Interface
 *         $Id: pos.h 5 2013-12-18 04:48:03Z brodtj1212@gmail.com $
 *******************************************************************************
 */

#ifndef _POSITIONING_H_
#define _POSITIONING_H_

/***** Definitions *****/
#define RADS8_MAX     1609
#define HEADING_MAX   RADS8_MAX

/***** Global Data *****/
extern int32_t X, Y;
extern uint16_t Heading;
extern int heading_error, lateral_error;

/***** Function Prototypes *****/
void pos_init(void);
int pos_task(void);
void pos_ctrl_clear(void);
int pos_ctrl(int desired_heading, int desired_left, int desired_right);
void pos_log_display(void);

#endif /* _POSITIONING_H_ */
